home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / bdos_xr1.zip / THOMAS.ZIP / STARTPF.CMD < prev   
OS/2 REXX Batch file  |  1996-04-22  |  2KB  |  65 lines

  1. /* STARTPF - START at Position with Font */
  2.  
  3. os2language = 'ENGLISH'     /* enter your OS/2's language here!   */
  4.                             /* supported values: ENGLISH, DEUTSCH */
  5.                             
  6. Parse Upper arg arg1 .
  7.  
  8. If arg1='SETXYWH' Then      /* recursively called ! */
  9.   Do
  10.     Parse arg arg1 mode x y w h
  11.     '@d:\os2\mode' mode            /* set video mode */
  12.     '@setwin move' x y      /* set xy coordinate of window */
  13.     '@setwin size' w h      /* set wh size of window */
  14.   End
  15. Else                        /* User called */
  16.   Do
  17.     Parse arg '"'title'"' mode x y w h font runcmd
  18.  
  19.     If RxFuncQuery('SysLoadFuncs')=1 Then
  20.       Do
  21.         Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  22.         Call SysLoadFuncs
  23.       End
  24.  
  25.     If Pos('X', translate(font))>0 Then
  26.       Do
  27.         Parse Upper Value font With fh 'X' fw
  28.         fontsize=d2c(fw*256+fh)
  29.       End
  30.     Else
  31.       Signal Help
  32.  
  33.     If translate(os2language)='ENGLISH' Then
  34.       tag='~Font Size...'
  35.     Else
  36.     If translate(os2language)='DEUTSCH' Then
  37.       tag='Schrif~tartgröße...'
  38.     Else
  39.       Signal Help
  40.  
  41.     savesize=SysIni('USER', 'Shield', tag)       /* save user ini font size  */
  42.     call SysIni 'USER', 'Shield', tag, fontsize  /* modify font size in ini  */
  43.     '@START "'title'" /WIN /N' runcmd /*run!*/
  44.     call SysIni 'USER', 'Shield', tag, savesize  /* restore font size in ini */
  45.     /* call SysSleep 5 */
  46.   End
  47. Exit 0
  48.  
  49. Help:
  50.   Say 'STARTPF - START at Position and select Font'
  51.   Say 'Freeware by Thomas Waldmann, using SETWIN of Michael Thompson.'
  52.   Say
  53.   Say 'Usage: startpf "title" mode x y w h font'
  54.   Say
  55.   Say '  title    = Window title'
  56.   Say '  mode     = argument for mode command e.g.: co80,25 or co80,50'
  57.   Say '  x y      = Window x/y pixel coordinates 0/0 is bottom left'
  58.   Say '  w h      = Window width / height in pixels'
  59.   Say '  font     = Font for window (8x8, 10x6, ...)'
  60.   Say
  61.   call charout ,'Press any key to exit ...'
  62.   Pull Dummy
  63.   Exit 1
  64. 
  65.